import baseUrl from './base-url-config'

const { product } = baseUrl

export default {
  // 💭中心管理
  // 获取
  getCentralManagementAPI: {
    url: `${product}/edc/builder/project/core/page`,
    method: 'GET',
  },
  // 删除
  deleteCentralManagementAPI: {
    url: `${product}/edc/builder/project/core/delete`,
    method: 'DELETE',
  },
  // 新增
  addCentralManagementAPI: {
    url: `${product}/edc/builder/project/core/create`,
    method: 'POST',
  },
  // 修改
  updateCentralManagementAPI: {
    url: `${product}/edc/builder/project/core/update`,
    method: 'PUT',
  },
  // 💭中心-数据库版本
  // 中心-数据库版本表结构
  getDatabaseVersionCoreTableAPI: {
    url: `${product}/edc/builder/project/coreDatabaseCRF/databaseVersionCoreTable`,
    method: 'GET',
  },
  // 批量关联中心
  batchInsertCoreDatabaseAPI: {
    url: `${product}/edc/builder/project/coreDatabaseCRF/batchInsertCoreDatabase`,
    method: 'POST',
  },
  // 目标版本列表
  getDatabaseVersionListAPI: {
    url: `${product}/edc/builder/project/coreDatabaseCRF/getDatabaseVersionList`,
    method: 'GET',
  },
  // （分页查询）中心-数据库版本
  getCoreDatabaseVersionListAPI: {
    url: `${product}/edc/builder/project/coreDatabaseCRF/coreDatabaseVersionList`,
    method: 'GET',
  },
  // 💭成员管理
  // 分页查询中心人员
  getMemberManagementAPI: {
    url: `${product}/edc/builder/project/core/user/page`,
    method: 'GET',
  },
  // 配置中心人员
  configMemberManagementAPI: {
    url: `${product}/edc/builder/project/core/user/set`,
    method: 'POST',
  },
  // 移除中心人员（支持批量移除）
  removeMemberManagementAPI: {
    url: `${product}/edc/builder/project/core/user/delete`,
    method: 'PUT',
  },
  // 项目人员列表
  getProjectUserListAPI: {
    url: `${product}/edc/builder/project/user/getProjectUserList`,
    method: 'GET',
  },
  // 中心列表
  getCentralListAPI: {
    url: `${product}/edc/builder/project/core/list`,
    method: 'GET',
  },
  // 修改角色
  updateCoreUserAPI: {
    url: `${product}/edc/builder/project/core/user/updateCoreUser`,
    method: 'PUT',
  },
  // 💭中心实验室
  // 分页查询中心实验室
  getCentralLabAPI: {
    url: `${product}/edc/builder/project/coreLab/coreLabList`,
    method: 'GET',
  },
  // 添加实验室
  addCentralLabAPI: {
    url: `${product}/edc/builder/project/coreLab/insertCoreLab`,
    method: 'POST',
  },
  // 中心实验室修改（包含OCR修改）
  editCentralLabAPI: {
    url: `${product}/edc/builder/project/coreLab/updateCoreLab`,
    method: 'PUT',
  },
  // 删除中心实验室id
  deleteCentralLabAPI: {
    url: `${product}/edc/builder/project/coreLab/delete`,
    method: 'DELETE',
  },
  // 中心实验室导出
  exportAPI: {
    url: `${product}/edc/builder/project/coreLab/export`,
    method: 'POST',
    responseType: 'blob',
  },

  // 下载中心实验室导入模版
  downloadTemplateCentralLabAPI: {
    url: `${product}/edc/builder/project/coreLab/downloadTemplate`,
    method: 'GET',
    responseType: 'blob',
  },

  // 导入
  importCoreLabAPI: {
    url: `${product}/edc/builder/project/coreLab/importCoreLab`,
    method: 'POST',
  },

  // 💭实验室参考值管理
  // 分页查询 实验室参考值
  getReferenceValueAPI: {
    url: `${product}/edc/builder/project/coreLabNormal/page`,
    method: 'POST',
  },
  // 模块名称列表
  getModuleNameAPI: {
    url: `${product}/edc/builder/project/coreLabNormal/getByCodeName`,
    method: 'GET',
  },
  // 添加实验室参考值
  addLabReferenceAPI: {
    url: `${product}/edc/builder/project/coreLabNormal/create`,
    method: 'POST',
  },
  // 修改实验室参考值
  updateLabReferenceAPI: {
    url: `${product}/edc/builder/project/coreLabNormal/update`,
    method: 'PUT',
  },
  // 作废/失效-实验室参考值
  isWasteLabReferenceAPI: {
    url: `${product}/edc/builder/project/coreLabNormal/isWaste`,
    method: 'PUT',
  },
  // 删除实验室参考值
  deleteLabReferenceAPI: {
    url: `${product}/edc/builder/project/coreLabNormal/delete`,
    method: 'PUT',
  },
  // 获取检查项名称下拉项
  getCheckOptionsAPI: {
    url: `${product}/edc/builder/database/crf/inline/code/getInlineCodeByCodeName`,
    method: 'GET',
  },
  // 导出实验室参考值信息
  exportLaboratoryInfoAPI: {
    url: `${product}/edc/builder/project/coreLabNormal/export`,
    method: 'POST',
    responseType: 'blob',
  },
  // 下载实验室参考值导入模版
  downloadTemplateAPI: {
    url: `${product}/edc/builder/project/coreLabNormal/downloadTemplate`,
    method: 'GET',
    responseType: 'blob',
  },
  // 导入实验室参考值
  importLaboratoryInfoAPI: {
    url: `${product}/edc/builder/project/coreLabNormal/importCoreLabNormal`,
    method: 'POST',
  },
}
